﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicServer;
using Model;
using LogicServer.Users;

namespace BugSysSolution.UserInfo
{
    public partial class MyInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindInfo();
            }
        }

        public void BindInfo() 
        {
            String uid = Request["id"] ?? String.Empty;

            UserLogic ml = new UserLogic();
            Users user = ml.GetUserById(uid);
            if (user == null)
            {
                return;
            }
            txt_email.InnerHtml = user.Email;
            txt_like.InnerHtml = user.Hobby;
            txt_qq.InnerHtml = user.QQ;
            txt_sina.InnerHtml = user.Sinaweibo;
            txt_realName.InnerHtml = user.RealName;
        }
    }
}